﻿<UserControl x:Class="Gao.Poker.App.UserControls.MemberEdit"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="90"/>
            <ColumnDefinition Width="350"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="85"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        
        <TextBlock Text="卡号：" Margin="1" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
        <TextBox Text="{Binding Path=Member.CardNo}" Margin="1" Grid.Column="1" VerticalContentAlignment="Center" Grid.Row="0"/>

        <TextBlock Text="姓名："  Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right"/>
        <TextBox Text="{Binding Path=Member.Name}" Margin="1" VerticalContentAlignment="Center"  Grid.Column="1" Grid.Row="1"/>

        <TextBlock Text="生日：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2"/>
        <DatePicker Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="2" DisplayDate="{Binding Member.Birthday}" SelectedDate="{Binding Member.Birthday}"/>

        <TextBlock Text="电话：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"/>
        <TextBox Text="{Binding Member.Telephone}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="3"/>

        <TextBlock Text="E-Mail：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4"/>
        <TextBox Text="{Binding Member.Email}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="4"/>

        <TextBlock Text="消费金额：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="5"/>
        <TextBox Text="{Binding Member.ConsumeMoney}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="5"/>

        <TextBlock Text="积分：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="6"/>
        <TextBox Text="{Binding Member.Points}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="6"/>

        <TextBlock Text="地址：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="7"/>
        <TextBox Text="{Binding Member.Address}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="7"/>

        <TextBlock Text="身份证：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="8"/>
        <TextBox Text="{Binding Member.IdNo}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="8"/>

        <TextBlock Text="开卡时间：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="9"/>
        <TextBlock Text="{Binding Member.OpenCardDate, StringFormat='yyyy-MM-dd hh:mm:ss'}"  VerticalAlignment="Center"  Margin="1" Grid.Column="1" Grid.Row="9"/>

        <TextBlock Text="备注：" HorizontalAlignment="Right" Margin="1" Grid.Column="0" Grid.Row="10"/>
        <TextBox Text="{Binding Member.Remark, Mode=TwoWay}" Margin="1" VerticalAlignment="Top" Grid.Column="1" Grid.Row="10" Height="80"/>

        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2"  Grid.Row="11" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center">
            <Button Padding="5" Style="{DynamicResource Orrange}" Width="60" FontSize="16" Height="35" Name="btnLogin" 
                    Command="{Binding SaveCommand}" CommandParameter="{Binding Member}">保存</Button>
        </StackPanel>
    </Grid>
</UserControl>
